import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取搜索关键字*/
export const getSearch = (params: { page: number, pageSize: number , title ?: string}) => {
    return request({
        url: '/api/v2/admin/getSearch',
        method: 'get',
        params
    })
} 

/**添加搜索关键字*/
export const addSearch = (data: addFormData ) => request({
    url: '/api/v2/admin/addSearch',
    method: 'post',
    data
}) 

/**删除搜索关键字*/
export const delSearch = (data: { ID: string }) => request({
    url: '/api/v2/admin/delSearch',
    method: 'post',
    data
})

/**更新搜索关键字*/
export const updataSearch = (data: editFormData) => request({
    url: '/api/v2/admin/updataSearch',
    method: 'post',
    data
})